package com.hzcx.app.simplechat.ui.mine.presenter;

import android.content.Context;

import com.hzcx.app.simplechat.api.BaseDialogObserver;
import com.hzcx.app.simplechat.api.BaseObserver;
import com.hzcx.app.simplechat.base.BasePresenter;
import com.hzcx.app.simplechat.model.LoginModel;
import com.hzcx.app.simplechat.model.UserModel;
import com.hzcx.app.simplechat.ui.login.bean.PhoneCityBean;
import com.hzcx.app.simplechat.ui.login.contract.PhoneCityContract;
import com.hzcx.app.simplechat.ui.mine.contract.MineContract;
import com.hzcx.app.simplechat.ui.user.bean.UserInfoBean;
import com.hzcx.app.simplechat.util.UserInfoUtil;

import java.util.List;

public class MinePresenter extends BasePresenter<MineContract.View> implements MineContract.Presenter {

    /**
     *  获取自己用户信息
     * @param context
     */
    @Override
    public void getUserInfo(Context context) {
        UserModel.getUserInfo(context, UserInfoUtil.getUserId(), new BaseObserver<UserInfoBean>() {
            @Override
            protected void onSuccess(UserInfoBean data) {
                mView.userInfoResult(data);
            }
        });
    }
}
